x=(input("输入一个数"));
y=0;
for i in x:
    y+=int(i)
print(y)
